vodik / repose

an archlinux repo poking tool
GNU General Public License v2.0
128 stars 15 forks source link

Packages in subdirectories #2

Closed KaiSforza closed 11 years ago

KaiSforza commented 11 years ago

repoman should not be adding packages from subdirectories, only things from the current directory specified. I don't believe that pacman handles things well when there are multiple directory layers:

:: Synchronizing package databases...
 WST420 is up to date
 WST420-debug is up to date
 repoman is up to date
 gtmanfred is up to date
 testing is up to date
 core is up to date
 extra is up to date
 community-testing is up to date
 community is up to date
 multilib-testing is up to date
 multilib is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for inter-conflicts...
warning: insufficient columns available for table display

Packages (2): xcb-util-wm-0.3.9-1  i3-git-4.5.1.r57.gdc522b6-1

Total Download Size:    0.24 MiB
Total Installed Size:   0.77 MiB

:: Proceed with installation? [Y/n] :: Retrieving packages ...
error: failed retrieving file 'i3-git-4.5.1.r57.gdc522b6-1-x86_64.pkg.tar.gz' from disk : Couldn't open file /home/wgiokas/.cache/pacman/pkg-bu/i3-git-4.5.1.r57.gdc522b6-1-x86_64.pkg.tar.gz
warning: failed to retrieve some files
error: failed to commit transaction (download library error)
Errors occurred, no packages were upgraded.

i3-git is in a subdirectory here.

vodik commented 11 years ago

Yeah, repo-add actually suffers from the same problem but the recursive directory search is only making the problem more visible.

The problem is that %FILENAME% (for repo-add too!) is set the package's base name: /foo/bar/repo/my-package.pkg.tar.gz -> my-package.pkg.tar.gz, regardless of were the package actually is relative to the repo database.

Thus unless the file is actually present in the same dir, pacman won't be able to find it.

Its something I actually have to poke at. I've asked Allan last night if pacman can handle relative paths for %FILENAME% and he basically told me its completely untested so I don't know what's the most appropriate thing to do is yet.

That said, I'll probably require a recursive find to be explicit in the near future.

KaiSforza commented 11 years ago

Interesting. I'll have to test out some hand-made db's.

KaiSforza commented 11 years ago

Oof. So, did some testing (edited the %FILENAME% to point to a subdir), and it actually works if that subdirectory is present on the host machine, but pacman will not make that directory for you.

vodik commented 11 years ago

Okay, this should now be fixed. Repoman now does two things:

Error messages need some love but this issue is effectively fixed.