freight-team / freight

A modern take on the Debian archive.
Other
107 stars 37 forks source link

for sources with patterns with ~ in names #80

Closed miroR closed 6 years ago

miroR commented 6 years ago

And also different possible extensions (.gz, bz2, xz, .lzma) are checked for to get only one ORIG_FILENAME out of the possible ones in apt_cache_source(). And one suspected typo marked (not changed, because not sure).

miroR commented 6 years ago

Just about the typo that never was... And I was thinking about it for days, is it, or is it not a typo. From man cut :

       Use one, and only one of -b, -c or -f.  Each LIST is made up of one range, or many ranges sepa‐
       rated  by  commas.  Selected input is written in the same order that it is read, and is written
       exactly once.  Each range is one of:

       N      N'th byte, character or field, counted from 1

       N-     from N'th byte, character or field, to end of line

       N-M    from N'th to M'th (included) byte, character or field

       -M     from first to M'th (included) byte, character or field
miroR commented 6 years ago

BTW, that goog-schmoog associated checker (well it may be a good thing, but... read on), does not like either the addons (NoScript, uBlock0, decentraleyes, no other, well, for completeness just one inactive: uMatrix), or some such thing, it tells me blank pages only... Currently it says

All checks have failed 1 failing check

but clicking on "Details" and the likes gives blank pages only.

mmoll commented 6 years ago

please check the failing build

mmoll commented 6 years ago

also, please submit only one change per PR. the tilde issue is not related to the filename extensions.

mmoll commented 6 years ago

and adding tests for the functionality would also be nice

miroR commented 6 years ago

@mmoll wrote

please check the failing build

How do I know, when it gives me blank pages only. Could anybody who gets some text out when they click on the "Details" pls. paste what fails?

also, please submit only one change per PR. the tilde issue is not related to the filename extensions.

True! But it's kind of almost trivial, both... The thing is, only when I did include both my changes, was I able to create Freight repo with both binary package and the sources, so...

And I called it a name by only one change because of brevity.

and adding tests for the functionality would also be nice

But how is it done? I had searched, but what can you I if it keeps showing blank pages to me?... I had tried a few times previously as well. I had even disabled the addons completely for a while...

miroR commented 6 years ago

Well, I can try and split it in two commits, would that be fine, pls.? (I'm not proficient in git, not yet at least.)

And also, again, pls. could anybody who gets some text out when they click on the "Details" pls. paste wgat they get, so it can be read in plain ASCII what fails and I get at least a little more info?... The enigma of not getting anything out of that Java applet is unnerving.

miroR commented 6 years ago

I did some more thinking. Apart from verbosity, without which I wouldn't be able to see what the program does, and which verbosity consists only of echoing variables, which should not matter, should not confuse the checker, the only other change is really trivial. To end of line 48 of lib/freight/ap.sh the addition of string: | sed 's/\.dsc//' Is that really worth bothering with an entire commit?

miroR commented 6 years ago

I have to add that naming it tilde is misleading. I simply misremembered. Upon many tries when sources just wouldn't be created and the freight cache always inevitably failed with message: [freight] skipping invalid Debian source package

At first I did suspect "~" in the filename was the reason. Just, as far as it seems to me now: it is not. But with these modifications it mostly works.

I just tried a few sources that I had lying around, and all these were created fine in Freight repo (real listing, not that I would publish them, but it was testing):

$ ls -l /var/lib/dev1miro/apt/ceres/
total 182480
-rw-r--r-- 3 mr mr     59740 2018-04-06 20:21 dbus_1.12.2-1.debian.tar.xz
-rw-r--r-- 3 mr mr      3684 2018-04-06 20:21 dbus_1.12.2-1.dsc
-rw-r--r-- 3 mr mr   2063143 2018-04-06 20:21 dbus_1.12.2.orig.tar.gz
-rw-r--r-- 3 mr mr     27384 2018-04-06 20:21 dbus-glib_0.108-3.debian.tar.xz
-rw-r--r-- 3 mr mr      2361 2018-04-06 20:21 dbus-glib_0.108-3.dsc
-rw-r--r-- 3 mr mr    812488 2018-04-06 20:21 dbus-glib_0.108.orig.tar.gz
-rw-r--r-- 1 mr mr      1323 2018-04-06 20:30 devuan-keyring_2017.10.03.dsc
-rw-r--r-- 1 mr mr     51464 2018-04-06 20:30 devuan-keyring_2017.10.03.tar.xz
-rw-r--r-- 3 mr mr  30393220 2018-04-06 17:53 palemoon_27.8.3~repack-4_amd64.deb
-rw-r--r-- 3 mr mr     28136 2018-04-06 17:53 palemoon_27.8.3~repack-4.debian.tar.xz
-rw-r--r-- 3 mr mr      1896 2018-04-06 17:53 palemoon_27.8.3~repack-4.dsc
-rw-r--r-- 3 mr mr 123982924 2018-04-06 17:53 palemoon_27.8.3~repack.orig.tar.xz
-rw-r--r-- 3 mr mr     35172 2018-04-06 20:28 rsync_3.1.2-2.1.debian.tar.xz
-rw-r--r-- 3 mr mr      1853 2018-04-06 20:28 rsync_3.1.2-2.1.dsc
-rw-r--r-- 3 mr mr    892724 2018-04-06 20:28 rsync_3.1.2.orig.tar.gz
-rw-r--r-- 3 mr mr     66352 2018-04-06 20:27 wireshark_2.4.5-1.debian.tar.xz
-rw-r--r-- 3 mr mr      3522 2018-04-06 20:27 wireshark_2.4.5-1.dsc
-rw-r--r-- 3 mr mr  28397076 2018-04-06 20:27 wireshark_2.4.5.orig.tar.xz
$

They all were freight add'ed smoothly and freight cache ran on them and created the repo with them, with all of them in the InRelease file, signed and all.

Just this one failed:

$ freight add -v devuan-keyring_2017.10.03.dsc devuan-keyring_2017.10.03.tar.xz apt/ceres
# [freight] added devuan-keyring_2017.10.03.dsc to apt/ceres
# [freight] added devuan-keyring_2017.10.03.tar.xz to apt/ceres
$ freight cache -v

# [freight] skipping invalid Debian source package devuan-keyring_2017.10.03.dsc
$

So more work awaiting Freight devs and contributors, but I will most likely be busy elsewhere with other obligations.

Regards!

mmoll commented 6 years ago

I have no idea, what all this is about. I'm closing this now, maybe someone else can shed some light on this and provide clear instructions what exactly is broken, so somebody can reproduce, write tests and fix the problem.