2012-03-13 22 views
7

के बारे में शिकायत करें मैंने डेबेलर का उपयोग करने से पहले अपने पैकेज बनाए हैं, लेकिन मैं बहुत निराशाजनक समस्या में भाग रहा हूं।पाइथन डेब पैकेज बनाने में परेशानी होने के कारण, संशोधित बाइनरी

यह मेरी फ़ाइल का पेड़ है:

usr/ 
`-- share 
    |-- applications 
    | `-- create-launcher.desktop 
    `-- create-launcher 
     |-- bin 
     | |-- callbacks.py 
     | |-- callbacks.pyc 
     | |-- create_launcher.py 
     | |-- create_launcher.pyc 
     | |-- file_handler.py 
     | |-- file_handler.pyc 
     | |-- make_launcher.py 
     | |-- make_launcher.pyc 
     | |-- message_dialog.py 
     | |-- message_dialog.pyc 
     | `-- session 
     |-- data 
     | `-- gui.glade 
     |-- images 
     | `-- icon_48x48.png 
     `-- README 

एक आप देख सकते हैं, मैं कुछ अजगर pyc फ़ाइलों को बाइनरी और छवि द्विआधारी हैं। अगर यह मेरी समस्या है मैं नहीं पता है, लेकिन मैं

dh_make 

चलाने डेबियन निर्देशिका पैदा करने और मैं सभी आवश्यक फ़ाइलों को संशोधित किया है।

अगर मैं चलाएँ:

dh_install 

सब कुछ सही Debian/बनाने-लांचर/usr ... स्थानों में चला जाता है।

फिर भी, अगर मैं चलाएँ:

debuild -uc -us 

मैं निम्नलिखित उत्पादन प्राप्त करें:

dpkg-buildpackage -rfakeroot -D -us -uc 
dpkg-buildpackage: source package create-launcher 
dpkg-buildpackage: source version 0.1.2+alpha-1 
dpkg-buildpackage: source changed by Narnie Harshoe <[email protected]> 
dpkg-source --before-build create-launcher-0.1.2+alpha 
dpkg-buildpackage: host architecture amd64 
fakeroot debian/rules clean 
dh clean 
    dh_testdir 
    dh_auto_clean 
    dh_clean 
dpkg-source -b create-launcher-0.1.2+alpha 
dpkg-source: info: using source format `3.0 (quilt)' 
dpkg-source: info: building create-launcher using existing ./create-launcher_0.1.2+alpha.orig.tar.gz 
dpkg-source: warning: ignoring deletion of directory share 
dpkg-source: warning: ignoring deletion of directory share/applications 
dpkg-source: warning: ignoring deletion of file share/applications/create-launcher.desktop 
dpkg-source: warning: ignoring deletion of directory share/create-launcher 
dpkg-source: warning: ignoring deletion of file share/create-launcher/README 
dpkg-source: warning: ignoring deletion of directory share/create-launcher/data 
dpkg-source: warning: ignoring deletion of file share/create-launcher/data/gui.glade 
dpkg-source: warning: ignoring deletion of directory share/create-launcher/images 
dpkg-source: warning: ignoring deletion of file share/create-launcher/images/icon_48x48.png 
dpkg-source: warning: ignoring deletion of directory share/create-launcher/bin 
dpkg-source: warning: ignoring deletion of file share/create-launcher/bin/message_dialog.py 
dpkg-source: warning: ignoring deletion of file share/create-launcher/bin/create_launcher.py 
dpkg-source: warning: ignoring deletion of file share/create-launcher/bin/callbacks.py 
dpkg-source: warning: ignoring deletion of file share/create-launcher/bin/make_launcher.py 
dpkg-source: warning: ignoring deletion of file share/create-launcher/bin/file_handler.py 
dpkg-source: warning: newly created empty file 'usr/share/applications/create-launcher.desktop' will not be represented in diff 
dpkg-source: error: cannot represent change to create-launcher-0.1.2+alpha/usr/share/create-launcher/images/icon_48x48.png: binary file contents changed 
dpkg-source: error: add usr/share/create-launcher/images/icon_48x48.png in debian/source/include-binaries if you want to store the modified binary in the debian tarball 
dpkg-source: error: cannot represent change to create-launcher-0.1.2+alpha/usr/share/create-launcher/bin/file_handler.pyc: binary file contents changed 
dpkg-source: error: add usr/share/create-launcher/bin/file_handler.pyc in debian/source/include-binaries if you want to store the modified binary in the debian tarball 
dpkg-source: warning: executable mode 0755 of 'usr/share/create-launcher/bin/create_launcher.py' will not be represented in diff 
dpkg-source: error: cannot represent change to create-launcher-0.1.2+alpha/usr/share/create-launcher/bin/message_dialog.pyc: binary file contents changed 
dpkg-source: error: add usr/share/create-launcher/bin/message_dialog.pyc in debian/source/include-binaries if you want to store the modified binary in the debian tarball 
dpkg-source: error: cannot represent change to create-launcher-0.1.2+alpha/usr/share/create-launcher/bin/make_launcher.pyc: binary file contents changed 
dpkg-source: error: add usr/share/create-launcher/bin/make_launcher.pyc in debian/source/include-binaries if you want to store the modified binary in the debian tarball 
dpkg-source: error: cannot represent change to create-launcher-0.1.2+alpha/usr/share/create-launcher/bin/create_launcher.pyc: binary file contents changed 
dpkg-source: error: add usr/share/create-launcher/bin/create_launcher.pyc in debian/source/include-binaries if you want to store the modified binary in the debian tarball 
dpkg-source: error: cannot represent change to create-launcher-0.1.2+alpha/usr/share/create-launcher/bin/callbacks.pyc: binary file contents changed 
dpkg-source: error: add usr/share/create-launcher/bin/callbacks.pyc in debian/source/include-binaries if you want to store the modified binary in the debian tarball 
dpkg-source: error: unrepresentable changes to source 
dpkg-buildpackage: error: dpkg-source -b create-launcher-0.1.2+alpha gave error exit status 2 

मुझे पता नहीं क्यों यह "निर्देशिका हिस्सेदारी का विलोपन अनदेखी" और इतने पर के बारे में बात कर रहा है। सबसे पहले, यह फ़ोल्डर usr के साथ शुरू करना चाहिए, साझा नहीं। दूसरा, वे हटाए नहीं गए हैं।

मेरी टैरबॉल घुमाने के बाद से कोई फ़ाइल नहीं बदली है, इसलिए मुझे समझ में नहीं आता कि द्विआधारी क्यों त्रुटि करते हैं।

यह शेयर के तहत क्यों दिख रहा है और नहीं/usr /?

यह डीएच के dh_install भाग को चलाने से पहले मर रहा प्रतीत होता है।

बहुत सराहना की सहायता करें।

उत्तर

10

बहुत सारे पढ़ने और परीक्षण और त्रुटि के बाद, मुझे पता चला कि क्या गलत था। मैं एक

dpkg-source -b create-launcher_0.1.2+alpha 

समाप्त हो चुकी थी और किसी कारण से, यह पैक बनाने-launcher_0.1.2 + alpha.orig.tar.gz फ़ाइल निर्देशिका बनाने-लांचर-0.1.2 + अल्फा तरह दिखता हटाने में विफल .orig.6h0gQo। मैंने इसमें देखा, और यह फ़ोल्डर के साथ शुरू हुआ: साझा करें, जैसा कि मैंने उपर्युक्त प्रश्न में उल्लेख किया है, उतना ही नहीं। इससे मुझे इस बारे में सोचना शुरू हो गया कि मैं टैर बनाने के साथ कैसे गड़बड़ कर सकता हूं। निश्चित रूप से, मैंने इसे शीर्ष फ़ोल्डर के रूप में usr के साथ बनाया है, और यह तुलना करने के लिए बंद "चॉप" है। मुझे create-launcher_0.1.2 + अल्फा/शीर्ष डीआईआर के रूप में टैर बनाने की आवश्यकता थी। इस प्रकार यह प्रत्येक पेड़ के नीचे "usr" dir के अंतर की अनुमति देता है।

यह अभी भी सही नहीं बनाया गया है।

dpkg-source --include-binaries -b create-launcher_0.1.2+alpha 

मुझे मिल गया है कि आप की तरह "--source-विकल्प" पैरामीटर के साथ कार्य करें:: मैं इस आदेश की जरूरत

debuild -uc -us --source-option=--include-binaries 

यह अभी भी विफल हो गया क्योंकि/bin निर्देशिका में मेरी vim सत्र फ़ाइल एक बदलाव दिखाया (मुझे नहीं पता क्यों, लेकिन मुझे इसे अनदेखा करने की आवश्यकता है। डीपीकेजी-स्रोत में कुछ अनदेखा विकल्प हैं।इस अंतिम आदेश ने चाल की:

debuild -uc -us --source-option=--include-binaries --source-option=-isession 

मैं सफलतापूर्वक डेब रोल करने में सक्षम था।

आशा है कि इससे किसी को वहां मदद मिलेगी। मेरे हिस्से पर बेवकूफ गलती। मुझे हर बार इसे बनाने की बजाय मेरी पुरानी लिपियों (टैर बनाने के लिए) का उपयोग करना सीखना चाहिए। सबक सीखा।

+0

धन्यवाद, एक उपयोगी उदाहरण। मैं डीपीकेजी को समझने की कोशिश कर रहा हूं: क्या आपके ऐप बनाने-लॉन्चर की पाइथन पर कोई निर्भरता है जिसे आपको घोषित करने की आवश्यकता है? यह एक .deb पैकेज बनाता है जो स्थापित होने पर .desktop फ़ाइल होती है ताकि आपका आइकन उदाहरण के लिए इंस्टॉल किए गए ऐप्स के तहत उबंटू सॉफ्टवेयर सेंटर में दिखाई दे? और आपका ऐप .desktop फ़ाइल बनाने में मदद करता है http://sourceforge.net/projects/createlauncher/?source=navbar – bootchk

+0

धन्यवाद! Https://wiki.debian.org/SimpleBackportCreation पर निम्नलिखित के साथ, '- स्रोत-विकल्प = - शामिल-बाइनरी' के अलावा, gnu बनाने के एक हस्ताक्षरित बैकपोर्ट के निर्माण के दौरान मुझे बचाया – Epu

1

आपको अपने स्रोत पैकेज में सभी *.pyc फ़ाइलों को शामिल नहीं करना चाहिए। जब आप बाइनरी पैकेज बनाते हैं तो डेबियन में आपके लिए इन्हें स्वचालित रूप से संकलित करने के लिए मशीनरी होती है। स्थापना चरण में, सुनिश्चित करें कि आप सभी फ़ाइलों को जगह में रखें, या debian/install फ़ाइल लिखें जो ऐसा करता है।

पायथनdh के लिए एडन है, जो मानक टूलचेन का उपयोग करते हुए पाइथन परियोजनाओं को स्वचालित रूप से संभाल सकता है। आप इसका उपयोग करने के लिए dh_make बता सकते हैं (यह फ़ाइल में मूल रूप से dh का विकल्प है)।

संबंधित मुद्दे