Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 941575 - www-apps/tt-rss-20241001: upgrade fails due to broken symlink (webapp-config bug?)
Summary: www-apps/tt-rss-20241001: upgrade fails due to broken symlink (webapp-config ...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-15 08:33 UTC by xiaojie+bugzillagentoo
Modified: 2024-10-22 09:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description xiaojie+bugzillagentoo 2024-10-15 08:33:29 UTC
Currently using tt-rss-20230901, installed through webapp.

Emerging tt-rss-20241001 is okay, but the webapp update fails :

# webapp-config -h rss.mydomain -d '' -U tt-rss 20241001
* Upgrading /tt-rss-20230901 to /tt-rss-20241001       
*   Installed by root on 2023-10-13 09:05:44                                                  
*   Config files owned by 0:0    
!file vendor/bin/phpstan.phar
!file vendor/bin/php-parse                                                                                                                                                                   
!file vendor/bin/phpstan     
!empty cache/feed-icons
!empty themes.local                            
!empty cache/feeds                             
!empty feed-icons                              
!empty vendor/bin                              
!empty plugins                                 
!empty vendor                                                                                                                                                                                
!empty cache                                   
!empty lock                                                                                                                                                                                  
*                                              
* There is a problem with your configuration file or an environment variable.
* webapp-config tried to read the variable "vhost_appdir"
* and received the following error:
*                                              
* No option 'vhost_appdir' in section: 'USER'
* Please note that webapp-config is not written in bash anymore
* and that you cannot use the bash scripting features.
--- !morecontents .webapp-tt-rss-20221204
--- /var/www/rss.mydomain/htdocs
*   Creating required directories
*   Linking in required files
*     This can take several minutes for larger apps
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.11/webapp-config", line 42, in <module>
    main()                                     
  File "/usr/lib/python-exec/python3.11/webapp-config", line 39, in main
    config.run()                               
  File "/usr/lib/python3.11/site-packages/WebappConfig/config.py", line 1509, in run
    old['WEB_PVR']).upgrade(self.maybe_get('cat'),
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/WebappConfig/server.py", line 131, in upgrade
    self.install(True)                         
  File "/usr/lib/python3.11/site-packages/WebappConfig/server.py", line 241, in install
    self.__add.mkdirs()
  File "/usr/lib/python3.11/site-packages/WebappConfig/worker.py", line 210, in mkdirs
    self.mkdirs(directory + '/' + i)
  File "/usr/lib/python3.11/site-packages/WebappConfig/worker.py", line 210, in mkdirs
    self.mkdirs(directory + '/' + i)
  File "/usr/lib/python3.11/site-packages/WebappConfig/worker.py", line 217, in mkdirs
    self.mkfile(directory + '/' + i)
  File "/usr/lib/python3.11/site-packages/WebappConfig/worker.py", line 458, in mkfile
    shutil.copy(src_name, dst_name)
  File "/usr/lib/python3.11/shutil.py", line 431, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.11/shutil.py", line 258, in copyfile
    with open(dst, 'wb') as fdst:
         ^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/var/www/rss.mydomain/htdocs/vendor/bin/php-parse'

The /var/www/rss.mydomain/htdocs/vendor directory contains subdirs « beberlei » and « bin ».  The bin subdir contains broken links to non-existent « ../nikic » and « ../phpstan » directories (which are present in the emerged package file list, but not in the webapp-installed tree).

# ls -1
php-parse (broken link to ../nikic/php-parser/bin/php-parse)
phpstan (broken link to ../phpstan/phpstan/phpstan)
phpstan.phar (broken link to ../phpstan/phpstan/phpstan.phar)
Comment 1 xiaojie+bugzillagentoo 2024-10-15 08:45:50 UTC
Note that before the webapp -U failed run, the htdocs/vendor directory seems to be properly populated :

# ls -1
autoload.php
beberlei
bin
chillerlan
composer
doctrine
j4mie
jonahgeorge
mervick
myclabs
nikic
opentracing
packaged
paragonie
phar-io
phpdocumentor
phpspec
phpstan
phpunit
psr
sebastian
spomky-labs
thecodingmachine
theseer
webmozart
Comment 2 James Le Cuirot gentoo-dev 2024-10-19 22:00:16 UTC
Sorry, I don't have much of a clue here. It worked fine for me. I can see that vendor/bin/php-parse used to a symlink and now it isn't. vendor/nikic/php-parser/bin/php-parse is still there, but maybe it temporarily disappears. webapp-config should handle this in any case, so I guess the bug lies there. Unfortunately, it gets very little love these days. :( You might have more luck if you manually delete the vendor directory first.
Comment 3 xiaojie+bugzillagentoo 2024-10-22 09:39:58 UTC
(In reply to James Le Cuirot from comment #2)
> Sorry, I don't have much of a clue here. It worked fine for me. I can see
> that vendor/bin/php-parse used to a symlink and now it isn't.
> vendor/nikic/php-parser/bin/php-parse is still there, but maybe it
> temporarily disappears. webapp-config should handle this in any case, so I
> guess the bug lies there. Unfortunately, it gets very little love these
> days. :( You might have more luck if you manually delete the vendor
> directory first.

Hello James,

Deleting the vendor/ directory tree before doing the webapp update did the trick. I got a lot of warnings (missing files, obviously because I deleted them) but the update was done and seems to work properly.

Thanks for the hin
Comment 4 xiaojie+bugzillagentoo 2024-10-22 09:41:56 UTC
[Mistakenly sent the unfinished comment]

> Thanks for the hin

Thanks for the hint.

Not sure if I should close the bug report, and if then how to qualify it (solved ? cantfix ?).