Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debianSync.py Debian 9 support #20

Open
Fredouye opened this issue Feb 9, 2019 · 0 comments
Open

debianSync.py Debian 9 support #20

Fredouye opened this issue Feb 9, 2019 · 0 comments

Comments

@Fredouye
Copy link

Fredouye commented Feb 9, 2019

Hi Philipp

first of all, many thanks for your scripts :)

I had an issue when trying to sync Debian 9 repos :

# /usr/local/sbin/debianSync.py --url=http://ftp.fr.debian.org/debian/dists/stretch-backports/main/binary-amd64/ --channel=debian_9_x86_64_backports --username=XXXXXXXXXX --password=XXXXXXX
INFO: Repo URL: http://ftp.fr.debian.org/debian/dists/stretch-backports/main/binary-amd64/
INFO: Repo root: http://ftp.fr.debian.org/debian/
Traceback (most recent call last):
File "/usr/local/sbin/debianSync.py", line 108, in <module>
if not md5 in channelPkgs and not sha1 in channelPkgs and not sha256 in channelPkgs:
NameError: name 'sha1' is not defined

Debian 9 seems to use only MD5/SH1256, eg. http://ftp.fr.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages.gz :

MD5sum: bfd88bde7902b5eac8513b9e13edd5bd
SHA256: 816160488aa6b4e856e271a280edc3af01f37fa83fb78047cc5d3d62ce405f9c

Whereas Debian <=8 used MD5, SHA1 and SHA256 : http://ftp.fr.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages.gz

MD5sum: 76995019ce046edb5468f03c9bf33021
SHA1: 650d9e0ffc0055ad56d1385fcfccd82859357251
SHA256: 723b05c7e34183231d034aaabfa3c2ebf47c29fd33a8de6f8fe5201992838f0d

I've justed edited debianSync.py like this :

--- debianSync.py 2019-02-09 11:19:34.134778184 +0100
+++ debianSync.py.old 2019-02-09 11:19:41.271801122 +0100
@@ -105,7 +105,7 @@
elif line[0] == 'SHA256':
sha256 = line[1].strip()

- if not md5 in channelPkgs and not sha1 in channelPkgs and not sha256 in channelPkgs:
+ if not md5 in channelPkgs and not sha256 in channelPkgs:
syncPkgs.append(filename)
else:
syncedPkgCount += 1

I guess it's not the ideal solution, but sync worked then.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant