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

"Failed to parse desc" with repo-add created databases #52

Open
yan12125 opened this issue Oct 29, 2017 · 0 comments
Open

"Failed to parse desc" with repo-add created databases #52

yan12125 opened this issue Oct 29, 2017 · 0 comments

Comments

@yan12125
Copy link

repo-add writes both %MD5SUM% and %SHA256SUM%. As a result repose -l foo fails:

$ repose -l lxqt
repose: failed to parse desc for compton-conf-git-0.3.0.3.g34a7cb6-1/desc

Here's a dump of the relevant desc file:

%FILENAME%
compton-conf-git-0.3.0.3.g34a7cb6-1-x86_64.pkg.tar.xz

%NAME%
compton-conf-git

%VERSION%
0.3.0.3.g34a7cb6-1

%DESC%
A graphical configuration tool for Compton X composite manager. Development version.

%GROUPS%
lxqt

%CSIZE%
38552

%ISIZE%
205824

%MD5SUM%
d955c56d020f370bf5c5ed44ab9f3ac4

%SHA256SUM%
3e7805671c6a55c597d31a23514322c696979599472b6d731df1687e1d0ff9a5

%URL%
https://github.com/lxde/compton-conf

%LICENSE%
LGPL2.1

%ARCH%
x86_64

%BUILDDATE%
1508864967

%PACKAGER%
Unknown Packager

%CONFLICTS%
compton-conf

%PROVIDES%
compton-conf=0.3.0.3.g34a7cb6

%DEPENDS%
qt5-base
libconfig

%MAKEDEPENDS%
cmake
git
qt5-tools
lxqt-build-tools-git

And I got a quick fix for this:

diff --git a/src/desc.rl b/src/desc.rl
index a60bf91..0bc4492 100644
--- a/src/desc.rl
+++ b/src/desc.rl
@@ -31,6 +31,7 @@
            | '%GROUPS%'       %{ parser->entry = PKG_GROUPS; }
            | '%CSIZE%'        %{ parser->entry = PKG_CSIZE; }
            | '%ISIZE%'        %{ parser->entry = PKG_ISIZE; }
+           | '%MD5SUM%'       %{ parser->entry = PKG_MD5SUM; }
            | '%SHA256SUM%'    %{ parser->entry = PKG_SHA256SUM; }
            | '%PGPSIG%'       %{ parser->entry = PKG_PGPSIG; }
            | '%URL%'          %{ parser->entry = PKG_URL; }
diff --git a/src/package.h b/src/package.h
index 7edd01c..040a860 100644
--- a/src/package.h
+++ b/src/package.h
@@ -16,6 +16,7 @@ enum pkg_entry {
     PKG_GROUPS,
     PKG_CSIZE,
     PKG_ISIZE,
+    PKG_MD5SUM,
     PKG_SHA256SUM,
     PKG_PGPSIG,
     PKG_URL,
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