Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xcffib
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Python Team
packages
xcffib
Commits
ebeaf558
Commit
ebeaf558
authored
2 years ago
by
Nilesh Patra
Browse files
Options
Downloads
Patches
Plain Diff
Fix FTBFS with applying upstream commit as patch for parse.hs (Closes: #1017252)
parent
e53525d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/0002-add-xcb-length-element-to-parse-hs.patch
+52
-0
52 additions, 0 deletions
debian/patches/0002-add-xcb-length-element-to-parse-hs.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
53 additions
and
0 deletions
debian/patches/0002-add-xcb-length-element-to-parse-hs.patch
0 → 100644
+
52
−
0
View file @
ebeaf558
From fa529ce43a412094e4a6f0b1c33913c7c3ab8af0 Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho@tycho.pizza>
Date: Sat, 2 Oct 2021 08:03:10 -0600
Subject: [PATCH] don't die on xcb's new "length" element
--- a/generator/Data/XCB/Python/Parse.hs
+++ b/generator/Data/XCB/Python/Parse.hs
@@ -92,7 +92,7 @@
processXHeader :: XHeader
-> State TypeInfoMap (String, Suite ())
processXHeader header = do
- let imports = [mkImport "xcffib", mkImport "struct", mkImport "six"]
+ let imports = [mkImport "xcffib", mkImport "struct", mkImport "io"]
version = mkVersion header
key = maybeToList $ mkKey header
globals = [mkDict "_events", mkDict "_errors"]
@@ -294,6 +294,7 @@
structElemToPyUnpack _ _ _ (Doc _ _ _) = Left (Nothing, "")
-- XXX: What does fd mean? we should implement it correctly
structElemToPyUnpack _ _ _ (Fd _) = Left (Nothing, "")
+structElemToPyUnpack _ _ _ (Length _ _) = Left (Nothing, "")
-- The switch fields pick the way to expression to pack based on the expression
structElemToPyUnpack _ _ _ (Switch name expr _ bitcases) =
@@ -352,9 +353,10 @@
[(Expr (), [GenStructElem Type])]
)]
structElemToPyPack _ _ _ (Pad i) = Left (Nothing, mkPad i)
--- TODO: implement doc and fd?
+-- TODO: implement these?
structElemToPyPack _ _ _ (Doc _ _ _) = Left (Nothing, "")
structElemToPyPack _ _ _ (Fd _) = Left (Nothing, "")
+structElemToPyPack _ _ _ (Length _ _) = Left (Nothing, "")
structElemToPyPack _ _ accessor (Switch n expr _ bitcases) =
let name = accessor n
cmp = xExpressionToPyExpr id expr
@@ -428,7 +430,7 @@
"ValueParams other than CARD{16,32} not allowed.")
buf :: Suite ()
-buf = [mkAssign "buf" (mkCall "six.BytesIO" noArgs)]
+buf = [mkAssign "buf" (mkCall "io.BytesIO" noArgs)]
mkPackStmts :: String
-> String
@@ -646,6 +648,7 @@
getName (Switch n _ _ _) = Just n
getName (Doc _ _ _) = Nothing
getName (Fd n) = Just n
+ getName (Length _ _) = Nothing
assign :: String -> Statement ()
assign n = mkAssign (mkDot "self" n) $ mkName n
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
ebeaf558
0001-disable-cabal-config-file.patch
0002-add-xcb-length-element-to-parse-hs.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment