Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 303316 Details for
Bug 227418
rpm-spec-mode's compilation buffer is read only
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Use a real compilation mode for rpmbuild
rpm-spec-mode.patch (text/plain), 4.40 KB, created by
Chip Coldwell
on 2008-04-22 14:36:45 UTC
(
hide
)
Description:
Use a real compilation mode for rpmbuild
Filename:
MIME Type:
Creator:
Chip Coldwell
Created:
2008-04-22 14:36:45 UTC
Size:
4.40 KB
patch
obsolete
>Index: rpm-spec-mode.el >=================================================================== >RCS file: /cvs/pkgs/rpms/emacs/devel/rpm-spec-mode.el,v >retrieving revision 1.9 >diff -u -r1.9 rpm-spec-mode.el >--- rpm-spec-mode.el 6 Nov 2007 16:28:20 -0000 1.9 >+++ rpm-spec-mode.el 22 Apr 2008 14:34:18 -0000 >@@ -63,7 +63,9 @@ > > ;;; Code: > >-(defconst rpm-spec-mode-version "0.12x" "Version of `rpm-spec-mode'.") >+(require 'compile) >+ >+(defconst rpm-spec-mode-version "0.12.1x.rh1" "Version of `rpm-spec-mode'.") > > (defgroup rpm-spec nil > "RPM spec mode with Emacs/XEmacs enhancements." >@@ -189,11 +191,6 @@ > :type 'boolean > :group 'rpm-spec) > >-(defcustom rpm-spec-use-compilation-mode t >- "*If non-nil, build in `compilation-mode' if it's available." >- :type 'boolean >- :group 'rpm-spec) >- > (defcustom rpm-spec-default-release "1" > "*Default value for the Release tag in new spec files." > :type 'string >@@ -225,6 +222,11 @@ > :type 'string > :group 'rpm-spec) > >+(defcustom rpm-spec-auto-topdir nil >+ "*Automatically detect an rpm build directory tree and define _topdir." >+ :type 'boolean >+ :group 'rpm-spec) >+ > (defgroup rpm-spec-faces nil > "Font lock faces for `rpm-spec-mode'." > :prefix "rpm-spec-" >@@ -1025,20 +1027,30 @@ > (setq buildoptions (cons "--nodeps" buildoptions))) > (if (and rpm-spec-sign-gpg (not rpm-no-gpg)) > (setq buildoptions (cons "--sign" buildoptions))) >- (save-excursion >- (set-buffer (get-buffer rpm-buffer-name)) >- (and rpm-spec-use-compilation-mode >- (fboundp 'compilation-mode) >- (compilation-mode)) >- (goto-char (point-max))) >- (let* ((process-environment (cons "EMACS=t" process-environment)) >- (process >- (apply 'start-process rpm-spec-build-command rpm-buffer-name >- rpm-spec-build-command buildoptions))) >- (if (and rpm-spec-sign-gpg (not rpm-no-gpg)) >- (let ((rpm-passwd-cache (read-passwd "GPG passphrase: "))) >- (process-send-string process (concat rpm-passwd-cache "\n")))) >- (set-process-filter process 'rpm-command-filter))) >+ >+ (if rpm-spec-auto-topdir >+ (if (string-match ".*/SPECS/$" default-directory) >+ (let ((topdir (expand-file-name default-directory))) >+ (setq buildoptions >+ (cons >+ (concat "--define \"_topdir " >+ (replace-regexp-in-string "/SPECS/$" "" topdir) >+ "\"") >+ buildoptions))))) >+ >+ (progn >+ (defun list->string (lst) >+ (if (cdr lst) >+ (concat (car lst) " " (list->string (cdr lst))) >+ (car lst))) >+ (compilation-start (list->string (cons rpm-spec-build-command buildoptions)) 'rpmbuild-mode)) >+ >+ (if (and rpm-spec-sign-gpg (not rpm-no-gpg)) >+ (let ((build-proc (get-buffer-process >+ (get-buffer >+ (compilation-buffer-name "rpmbuild" nil nil)))) >+ (rpm-passwd-cache (read-passwd "GPG passphrase: "))) >+ (process-send-string build-proc (concat rpm-passwd-cache "\n"))))) > > (defun rpm-build-prepare (&optional arg) > "Run a `rpmbuild -bp'." >@@ -1233,14 +1245,17 @@ > (save-excursion > (goto-char (point-min)) > (if (search-forward-regexp >- "^\\(Release[ \t]*:[ \t]*\\)\\([0-9]+\\)\\(.*\\)" nil t) >- (let ((release (1+ (string-to-int (match-string 2))))) >- (setq release (concat (int-to-string release) (match-string 3))) >+ ;; Try to find the last digit-only group of a dot-separated release string >+ (concat "^\\(Release[ \t]*:[ \t]*\\)" >+ "\\(.*[ \t\\.}]\\)\\([0-9]+\\)\\([ \t\\.%].*\\|$\\)") nil t) >+ (let ((release (1+ (string-to-int (match-string 3))))) >+ (setq release >+ (concat (match-string 2) (int-to-string release) (match-string 4))) > (replace-match (concat (match-string 1) release)) > (message "Release tag changed to %s." release)) > (if (search-forward-regexp "^Release[ \t]*:[ \t]*%{?\\([^}]*\\)}?$" nil t) > (rpm-increase-release-with-macros) >- (message "No Release tag found..."))))) >+ (message "No Release tag to increase found..."))))) > > ;;------------------------------------------------------------ > >@@ -1403,8 +1418,9 @@ > rpm-spec-mode-version > " by Stig Bjørlykke, <stigb@tihlde.org>"))) > >-;;;###autoload(add-to-list 'auto-mode-alist '("\\.spec\\(\\.in\\)?$" . rpm-spec-mode)) >- > (provide 'rpm-spec-mode) >+;;;###autoload >+(define-compilation-mode rpmbuild-mode "RPM spec" "" >+ (set (make-local-variable 'compilation-disable-input) t)) > > ;;; rpm-spec-mode.el ends here
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 227418
:
147407
|
277611
|
303198
| 303316