[pacman-dev] Empty repo databases
Hi, With the community-testing repo now being empty, I get the following:
pacman -Syu :: Synchronizing package databases... kernel64 is up to date testing 10.3K 21.2K/s 00:00:00 [#####################] 100% core 33.8K 34.8K/s 00:00:01 [#####################] 100% extra 429.2K 13.0K/s 00:00:33 [#####################] 100% error: failed retrieving file 'community-testing.db.tar.gz' from <"mirror"> : Not Found error: failed to update community-testing (Not Found) community 365.3K 10.2K/s 00:00:36 [#####################] 100% :: Starting full system upgrade... local database is up to date
Can we leave a shell database somehow when using repo-rm on the last package? It seems [testing] has never been empty! Allan
On Tue, Sep 22, 2009 at 6:59 PM, Allan McRae <allan@archlinux.org> wrote:
Hi,
With the community-testing repo now being empty, I get the following:
pacman -Syu :: Synchronizing package databases... kernel64 is up to date testing 10.3K 21.2K/s 00:00:00 [#####################] 100% core 33.8K 34.8K/s 00:00:01 [#####################] 100% extra 429.2K 13.0K/s 00:00:33 [#####################] 100% error: failed retrieving file 'community-testing.db.tar.gz' from <"mirror"> : Not Found error: failed to update community-testing (Not Found) community 365.3K 10.2K/s 00:00:36 [#####################] 100% :: Starting full system upgrade... local database is up to date
Can we leave a shell database somehow when using repo-rm on the last package? It seems [testing] has never been empty!
Xavier is the expert on this one, I believe he has mentioned the empty DB case before. -Dan
On Wed, Sep 23, 2009 at 2:09 AM, Dan McGee <dpmcgee@gmail.com> wrote:
On Tue, Sep 22, 2009 at 6:59 PM, Allan McRae <allan@archlinux.org> wrote:
Hi,
With the community-testing repo now being empty, I get the following:
pacman -Syu :: Synchronizing package databases... kernel64 is up to date testing 10.3K 21.2K/s 00:00:00 [#####################] 100% core 33.8K 34.8K/s 00:00:01 [#####################] 100% extra 429.2K 13.0K/s 00:00:33 [#####################] 100% error: failed retrieving file 'community-testing.db.tar.gz' from <"mirror"> : Not Found error: failed to update community-testing (Not Found) community 365.3K 10.2K/s 00:00:36 [#####################] 100% :: Starting full system upgrade... local database is up to date
Can we leave a shell database somehow when using repo-rm on the last package? It seems [testing] has never been empty!
Xavier is the expert on this one, I believe he has mentioned the empty DB case before.
-Dan
This is an old commit from me : 37bb99abfa5672e101e34579882e22c7a1016a9b (It was also brought up more recently by me, but it was just some code rewrite, no behavior change). Before, repo-rm on the last package would leave the last package in the database, which was quite odd. Having an empty file would be odd too, because tar/bsdtar would fail on it. What about an empty tar archive ? It seems to be possible using : bsdtar cvzf test.tar.gz -T /dev/null (this works with gnu tar too)
Xavier schrieb:
Before, repo-rm on the last package would leave the last package in the database, which was quite odd. Having an empty file would be odd too, because tar/bsdtar would fail on it.
$ touch foo.db.tar.gz $ bsdtar -xf foo.db.tar.gz $ echo $? 0 $
On Wed, Sep 23, 2009 at 10:40 AM, Thomas Bächler <thomas@archlinux.org> wrote:
Xavier schrieb:
Before, repo-rm on the last package would leave the last package in the database, which was quite odd. Having an empty file would be odd too, because tar/bsdtar would fail on it.
$ touch foo.db.tar.gz $ bsdtar -xf foo.db.tar.gz $ echo $? 0 $
I tried quite a while ago, I just remembered that at least one of the two failed :) It seems gnu tar still fails. And bsdtar could always have changed in the meantime, I don't know. Anyway this seems to work for all combination (4) of gnutar/bsdtar, so it is still my preferred solution : tar cvzf test.tar.gz -T /dev/null tar xf test.tar.gz
Am Mittwoch 23 September 2009 11:45:53 schrieb Xavier:
Anyway this seems to work for all combination (4) of gnutar/bsdtar, so it is still my preferred solution : tar cvzf test.tar.gz -T /dev/null tar xf test.tar.gz
Looks fine to me; and I think we should implement this. The point is that its not easy to determine if there is a server/mirror error or if the repo is just empty. -- Pierre Schmitz, http://users.archlinux.de/~pierre
On Thu, Sep 24, 2009 at 8:52 AM, Pierre Schmitz <pierre@archlinux.de> wrote:
Am Mittwoch 23 September 2009 11:45:53 schrieb Xavier:
Anyway this seems to work for all combination (4) of gnutar/bsdtar, so it is still my preferred solution : tar cvzf test.tar.gz -T /dev/null tar xf test.tar.gz
Looks fine to me; and I think we should implement this. The point is that its not easy to determine if there is a server/mirror error or if the repo is just empty.
Looks like Dan implemented it already :) http://code.toofishes.net/cgit/dan/pacman.git/commit/?h=maint&id=7f14f185a2d05650e1f99f4ec40d60b597e8b0c7 Would a server/mirror error still produce a valid tar.gz file ?
Am Donnerstag 24 September 2009 08:58:50 schrieb Xavier:
Would a server/mirror error still produce a valid tar.gz file ?
Very unlikely. PS: Nice; now we need someone to deploy this on gerolde/sigurd. :-) -- Pierre Schmitz, http://users.archlinux.de/~pierre
On Wed, Sep 23, 2009 at 11:45 AM, Xavier <shiningxc@gmail.com> wrote:
On Wed, Sep 23, 2009 at 10:40 AM, Thomas Bächler <thomas@archlinux.org> wrote:
Xavier schrieb:
Before, repo-rm on the last package would leave the last package in the database, which was quite odd. Having an empty file would be odd too, because tar/bsdtar would fail on it.
$ touch foo.db.tar.gz $ bsdtar -xf foo.db.tar.gz $ echo $? 0 $
I tried quite a while ago, I just remembered that at least one of the two failed :) It seems gnu tar still fails. And bsdtar could always have changed in the meantime, I don't know.
Anyway this seems to work for all combination (4) of gnutar/bsdtar, so it is still my preferred solution : tar cvzf test.tar.gz -T /dev/null tar xf test.tar.gz
I forgot to say that pacman would also likely fail on an empty file, because it also extracts the downloaded database using libarchive. Anyway, Dan already made a patch using the above line to produce an empty tar file :)
participants (5)
-
Allan McRae
-
Dan McGee
-
Pierre Schmitz
-
Thomas Bächler
-
Xavier